QT       += core gui sql printsupport

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    main.cpp \
    mainwindow.cpp \
    src/database/cdatabase.cpp \
    src/ui/course.cpp \
    src/ui/luaeditor.cpp \
    src/ui/studentscore.cpp \
    third/qcp/qcustomplot.cpp \
    third/singleton_cpp/src/singleton.cpp

HEADERS += \
    mainwindow.h \
    src/database/cdatabase.h \
    src/ui/course.h \
    src/ui/luaeditor.h \
    src/ui/studentscore.h \
    third/qcp/qcustomplot.h \
    third/singleton_cpp/include/singleton.h \
    third/singleton_cpp/include/singleton_api.h

FORMS += \
    mainwindow.ui

INCLUDEPATH += $$PWD/third/orm/ormpp/include    \
               $$PWD/third/orm/ormpp/thirdparty/sqlite3

INCLUDEPATH += $$PWD/third/qsci/include
#ormpp宏定义
DEFINES += QT_DEPRECATED_WARNINGS ORMPP_ENABLE_SQLITE3 QT_NO_FLOAT16_OPERATORS

CONFIG += debug_and_release

INCLUDEPATH += $$PWD/third/lua/include
LIBS += $$PWD/third/lua/liblua54.a

INCLUDEPATH += $$PWD/third/sol/

CONFIG(debug,debug|release){
    LIBS += -L$$PWD/third/orm/msvc_64_d \
            -lsqlite3
    LIBS += -l$$PWD/third/qsci/debug/qscintilla2_qt5d
} else {
    LIBS += -L$$PWD/third/orm/msvc_64_r \
        -lsqlite3
    LIBS += -L$$PWD/third/qsci/release \
            -lqscintilla2_qt5
}

DEFINES += PRO_FILE_PATH=$$_PRO_FILE_PWD_

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
